
// 删除弹窗封装

export function box(index,methods,path,parameter){
    this.$confirm('此操作将永久删除此数据, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
    }).then(async () => {
        const { data: res } = methods == 'post' ? await this.$http.post(path, [index]) : await this.$http.get(`${path}?${parameter}=${[index]}`)
          if (res.code === 20000) {
              this.getList()
            this.$message.success('删除成功！')
          } else {
            this.$message.error(res.msg);
          }
      })
}
